bash




#!/bin/bash

echo "=== 修复版RealSense相机启动 ==="

source /opt/ros/humble/setup.bash

# 使用更稳定的配置
ros2 launch realsense2_camera rs_launch.py \
    pointcloud.enable:=true \
    align_depth.enable:=true \
    enable_color:=true \
    enable_depth:=true \
    depth_module.depth_profile:=424x240x15 \
    rgb_camera.color_profile:=424x240x15 \
    infra_width:=424 \
    infra_height:=240 \
    infra_fps:=15 \
    enable_gyro:=true \
    enable_accel:=true \
    unite_imu_method:=linear_interpolation \
    gyro_fps:=200 \
    accel_fps:=100 \
    initial_reset:=true